import { type NuxtConfig } from 'nuxt/config'

export const pinia: NuxtConfig['pinia'] = {
  autoImports: ['defineStore', 'storeToRefs'],
}

export const piniaPersistedstate: NuxtConfig['piniaPersistedstate'] = {
  // storage: 'localStorage',
}

export const vant: NuxtConfig['vant'] = {
  lazyload: {
    lazyComponent: true,
  },
}

export const elementPlus: NuxtConfig['elementPlus'] = {
  importStyle: 'scss',
  icon: false,
}

export const postcss: NuxtConfig['postcss'] = {
  plugins: {
    tailwindcss: {},
    autoprefixer: {},
  },
}

export const i18n: NuxtConfig['i18n'] = {
  locales: ['en', 'zh'],
  defaultLocale: 'zh',
  vueI18n: './i18n.config.ts',
}
